package com.cnhis.cloudhealth.clinical.clidoctor.clidoctor.dao;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.cnhis.cloudhealth.commons.dao.BaseDao;
import com.cnhis.cloudhealth.commons.utils.Page;

import java.util.HashMap;

@Repository
public class CliDoctorDao extends BaseDao
{
    public Map getDoctorPosition(Map map)
        throws Exception
    {
        return (Map)queryForExtObject("CliDoctor.getDoctorPosition", map);
    }
    
    public List getTempListL(Map params)
        throws Exception
    {
        return queryForList("CliDoctor.getTempListL", params);
    }
    public List getTempListL_batch(Map params)
        throws Exception
    {
        return queryForList("CliDoctor.getTempListL_batch", params);
    }

    public List getTempListE(Map params)
        throws Exception
    {
        return queryForList("CliDoctor.getTempListE", params);
    }
    public List getTempListE_batch(Map params)
        throws Exception
    {
        return queryForList("CliDoctor.getTempListE_batch", params);
    }

    public List getTemp1List(Map map) throws Exception
    {
        return queryForList("CliDoctor.getTemp1List", map);
    }

    public void updateCbw1(int cbw03) throws Exception
    {
        getSqlSession().update("CliDoctor.updateCbw1",cbw03);
    }

    public void insertCbw1(Map map) throws Exception
    {
        getSqlSession().insert("CliDoctor.insertCbw1",map);
    }
    
    public int getCbw1() throws Exception
    {
        return getSqlSession().selectOne("CliDoctor.getCbw1");
    }

    public void insertVbq1(Map bel1) throws Exception
    {
        insert("CliDoctor.insertVbq1", bel1);
    }

    public void updateVaf1(Map bel1) throws Exception
    {
        update("CliDoctor.updateVaf1", bel1);
    }

    public void updateVbi1(Map bel1) throws Exception
    {
        update("CliDoctor.updateVbi1", bel1);
    }

    public void insertVbq1_E(Map bel1) throws Exception
    {
        insert("CliDoctor.insertVbq1_E", bel1);
    }

    public void updateVaf1_E(Map bel1) throws Exception
    {
        update("CliDoctor.updateVaf1_E", bel1);
    }

    public void updateVbi1_E(Map bel1) throws Exception
    {
        update("CliDoctor.updateVbi1_E", bel1);
    }
    public void insertVbq1_batch(Map bel1) throws Exception
    {
        insert("CliDoctor.insertVbq1_batch", bel1);
    }
    
    public void updateVaf1_batch(Map bel1) throws Exception
    {
        update("CliDoctor.updateVaf1_batch", bel1);
    }
    
    public void updateVbi1_batch(Map bel1) throws Exception
    {
        update("CliDoctor.updateVbi1_batch", bel1);
    }
    
    public void insertVbq1_E_batch(Map bel1) throws Exception
    {
        insert("CliDoctor.insertVbq1_E_batch", bel1);
    }
    
    public void updateVaf1_E_batch(Map bel1) throws Exception
    {
        update("CliDoctor.updateVaf1_E_batch", bel1);
    }
    
    public void updateVbi1_E_batch(Map bel1) throws Exception
    {
        update("CliDoctor.updateVbi1_E_batch", bel1);
    }

    public List getGeiyaoZhixing(HashMap map) throws Exception
    {
        return queryForList("CliDoctor.getGeiyaoZhixing", map);
    }

    public Map getBce03(HashMap map) throws Exception
    {
        return (Map)queryForExtObject("CliDoctor.getBce03", map);
    }

	public void updatenewvaa03(Integer incCount) {
		getSqlSession().update("CliDoctor.updatenewvaa03", incCount);
	}

	public List selectVAA1ID3() {
		return getSqlSession().selectList("CliDoctor.selectVAA1ID3");
	}

	public void insertnewvaa03() {
		getSqlSession().insert("CliDoctor.insertnewvaa03");
	}

    public List queryBce1Info(Map paramMap) throws Exception
    {
        return queryForList("CliDoctor.queryBce1Info", paramMap);
    }

    public List getYiyuanInfo(String string, Object object) throws Exception
    {
        return queryForList("CliDoctor.getYiyuanInfo", null);
    }

    public Object queryVac1ByVcb(String string, Map params) throws Exception
    {
        return queryForExtObject("CliDoctor.queryVac1ByVcb", params);
    }
    public Page queryPageByParams(Map<String, Object> params, int currPage, int pageSize) throws Exception {
        return this.queryForPage("CliDoctor.queryPageByParams", params, currPage, pageSize);

    }

    public Map getHccode(HashMap map) throws Exception
    {
        return (Map)queryForExtObject("CliDoctor.getHccode", map);
    }

    public Map querySysTime(HashMap<Object, Object> hashMap) throws Exception
    {
        return (Map)queryForExtObject("CliDoctor.querySysTime", hashMap);
    }
    
    public int getCbwCount()throws Exception
    {
        return getSqlSession().selectOne("CliDoctor.getCbwCount");
    }

    public int updateCbw1_(int i)throws Exception
    {
        return getSqlSession().selectOne("CliDoctor.updateCbw1_",i);
    }
}
